AddMediaDataRef
TheAddMediaDataRef
function adds a data reference to a media.
pascal OSErr AddMediaDataRef (Media theMedia, short *index, Handle dataRef, OSType dataRefType);
theMedia
- Specifies the media for this operation. Your application obtains this media identifier from such Movie Toolbox functions as
NewTrackMedia
andGetTrackMedia
(described on page 2-138 and page 2-190, respectively).index
- Contains a pointer to a short integer. The Movie Toolbox returns the index value that is assigned to the new data reference. Your application can use this index to identify the reference to other Movie Toolbox functions, such as
GetMediaDataRef
(described on page 2-201). If the Movie Toolbox cannot add the data reference to the media, it sets the returned index value to 0.dataRef
- Specifies the data reference. This parameter contains a handle to the information that identifies the file that contains this media's data. The type of information stored in that handle depends upon the value of the
dataRefType
parameter.dataRefType
- Specifies the type of data reference. If the data reference is an alias, you must set this parameter to
rAliasType ('alis')
, indicating that the reference is an alias. See Inside Macintosh: Files for more information about aliases and the Alias Manager.ERROR CODES
invalidMedia -2008 This media is corrupted or invalid